@extends('blog.layouts.default')

@section('content')

  <header class="archives-bg">
    @include('blog.layouts.navbar')
    <div class="heading">
      <h1>Archives</h1>
      <span>岁去弦吐箭</span>
    </div>
  </header>

  <div class="archives-content container">
    @if (count($archives) > 0)
      @foreach ($archives as $archive)
        <div class="archives-list hr">
          <h3 id="{{ $archive->publish_years }}">{{ $archive->publish_years }}</h3>
          @foreach ($archive->posts as $post)
            <li><a href="{{ route('detail', $post->slug) }}">{{ $post->title }}</a></li>
          @endforeach
        </div>
      @endforeach
    @endif
  </div>

@endsection
